import request from '@/utils/request'

// 查询抽奖记录列表
export function listLuckdraw(query) {
  return request({
    url: '/luckdraw/luckdraw/list',
    method: 'get',
    params: query
  })
}

// 查询抽奖记录详细
export function getLuckdraw(id) {
  return request({
    url: '/luckdraw/luckdraw/' + id,
    method: 'get'
  })
}

// 新增抽奖记录
export function addLuckdraw(data) {
  return request({
    url: '/luckdraw/luckdraw',
    method: 'post',
    data: data
  })
}

// 修改抽奖记录
export function updateLuckdraw(data) {
  return request({
    url: '/luckdraw/luckdraw',
    method: 'put',
    data: data
  })
}

// 删除抽奖记录
export function delLuckdraw(id) {
  return request({
    url: '/luckdraw/luckdraw/' + id,
    method: 'delete'
  })
}

// 导出抽奖记录
export function exportLuckdraw(query) {
  return request({
    url: '/luckdraw/luckdraw/export',
    method: 'get',
    params: query
  })
}